/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import { ModuleModel } from '../../model/module/module-model.js';
import { ProjectModel } from '../../model/project/project-model.js';
import { DependencyManager } from '../../project/dependency/dependency-manager.js';
import { ModuleTaskService } from './module-task-service.js';

/**
 * 用于创建每个module的ModuleTaskService
 *
 * @since 2022/8/11
 */
export class ModuleTaskServiceFactory {
  static initModuleTaskService(projectModel: ProjectModel, moduleModel: ModuleModel, isFaMode: boolean): ModuleTaskService {
    const dependencyManager = new DependencyManager(isFaMode, moduleModel, projectModel);
    return new ModuleTaskService(projectModel, moduleModel, dependencyManager, isFaMode);
  }
}
